<template>
  <div class="weui-panel weui-panel_access mycard">
    <div class="weui-panel__hd">用时{{totaltimestr}}<span class="ordertime">{{order_detail.evaluateTime}}</span></div>
    <div class="weui-panel__bd">
      <div class="weui-media-box weui-media-box_text">
        <h4 class="weui-media-box__title">{{order_detail.userEvaluate.star}}分</h4>
        <p class="weui-media-box__desc">{{order_detail.userEvaluate.desc}}</p>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'OdOpinion',
  props: [],
  data () {
    return {
      totaltimestr: ''
    }
  },
  computed: {
    ...mapState(['order_detail'])
  },
  mounted () {
    let totaltime = Math.round((Date.parse(this.order_detail.evaluateTime.replace(/-/g, '/')) - Date.parse(this.order_detail.createTime.replace(/-/g, '/'))) / 1000)
    this.totaltimestr = this.cm.gettimestr(totaltime)
  }
}
</script>

<style lang="stylus" scoped>
.weui-media-box__title
  font-size .48rem
  line-height .76rem
</style>
